use serde::{Deserialize, Serialize};

#[derive(Deserialize, Serialize, Debug, Default)]
pub struct UserInfo {
    pub user_id: String,
    pub email: String,
    pub username: String,
    pub level: u8,
    pub birthday: String,
    pub created_at: String,
}

#[derive(Deserialize, Serialize, Debug, Default)]
pub struct RegisterRequest {
    pub username: String,
    pub email: String,
    pub password: String,
}

#[derive(Deserialize, Serialize, Debug, Default)]
pub struct LoginRequest {
    pub email: String,
    pub password: String,
}

#[derive(Deserialize, Serialize, Debug, Default)]
pub struct LoginResponse {
    pub username: String,
    pub user_id: String,
    pub level: u8,
    pub new_token: String,
    pub token_expiration: u64,
}

#[derive(Deserialize, Serialize, Debug, Default)]
pub struct ChangePasswordRequest {
    pub user_id: String,
    pub old_password: String,
    pub new_password: String,
}
